th, tr, td, span, div, label, button {
    user-select: none;
}
input[type=range]::-moz-focus-outer {
    border: 0;
}
select {
    outline: none;
}
.dialog {
    display: none;
    color: black;
    padding: 10px;
    border: 3px solid #ddd;
    border-radius: 3px;
    background-color: rgba(255,255,255,0.75);
    position: fixed;
    top: 5px;
}
.dialog span {
    padding: 2px 5px 2px 5px;
    margin: 0 5px 5px 5px;
    background-color: #eee;
    border-radius: 5px;
    border: 1px solid #aaa;
    text-align: center;
}
.helper {
    position: relative;
    display: none;
}
.mono {
    unicode-bidi: embed;
    font-family: monospace;
    white-space: pre;
}
#selection {
    display: none;
    text-align: center;
    position: fixed;
    width: 100%;
    bottom: 3px;
}
#selection span {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 3px 8px 8px 8px;
    background-color: rgba(170,221,255,0.75);
    color: rgba(0,0,0,0.5);
}
#selection label {
    border: 0;
}
#selection .value {
    font-weight: bold;
    font-style: italic;
    color: black;
}
#selection button {
    margin: 0 2px 0 2px !important;
    border: 1px solid rgba(255,255,255,0.75);
}
#appid {
    text-align: center;
    position: fixed;
    width: 100%;
    top: 3px;
}
#appid span {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px 8px 3px 8px;
    background-color: rgba(170,221,255,0.75);
    color: rgba(0,0,0,0.5);
}
#appid a {
    color: rgba(0,0,0,0.75);
    font-weight: bold;
}
#appid a:hover {
    color: rgba(0,50,50,0.75);
}
#container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#loading {
    position: fixed;
    top: 30px;
    left: 20%;
    right: 20%;
    margin: 2px;
    background-color: rgba(200,200,200,0.65);
    border: 3px solid rgba(200,200,200,0.5);
    border-radius: 5px;
    text-align: center;
    display: none;
}
#progress {
    display: flex;
    position: relative;
    text-align: left;
    background-color: rgba(255,0,0,0.75);
    width: 100%;
}
#prostatus {
    color: white;
    padding: 5px;
    margin: 5px;
}
#modal {
    z-index: 20000;
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    background-color: rgba(0,0,0,0.2);
    display: none;
}

/** PRINT DIALOG */

#print {
    position: fixed;
    -webkit-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
    text-align: center;
    top: 50px;
    left: 50%;
    color: black;
    border: 10px solid #ddd;
    border-radius: 10px;
    background-color: rgba(255,255,255,0.9);
    padding: 10px;
}
#print button {
    font-weight: bold;
}
#print-close {
    position: absolute;
    z-index: 200;
    right: 3px;
    top: 3px;
}
#print > div {
    border: 1px solid #aaa;
    border-radius: 3px;
    padding: 2px;
    margin: 6px 0 6px 0;
}
.print-sel {
    position: relative;
    margin-top: 15px !important;
    padding: 15px 5px 10px 5px !important;
}
.print-sel > div {
    flex-grow: 1;
}
.print-send {
    margin: 0 0 0 5px !important;
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
}
.print-gcode > button {
    margin: 0 2px 0 2px !important;
    height: 30px;
}
.print-sel > button {
    max-width: 1000px;
    flex-basis: 100px;
}
.print-sel > span {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
}
.print-sel > span > label {
    background-color: rgba(255,255,255,0.9);
    font-size: 15px;
    padding: 0 5px 0 5px;
    border-top: 0;
    border-bottom: 0;
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
    border-radius: 5px;
}
.print-sel td,th {
    padding: 2px;
}
.print-sel th {
    text-align: right !important;
}
#print .print-sel:hover {
    border: 1px solid #555;
}
#print table {
    width: 100%;
}
#print th {
    text-align: left;
}
#print td {
    text-align: right;
}
#print input {
    text-align: right;
}
#print input[disabled] {
    background-color: #eee;
    border-color: #ddd;
    color: black;
}
#print-density {
    disabled: false;
}
#grid-hint {
    font-style: italic;
    font-weight: lighter;
    font-size: 10px;
}
#octo-hint {
    font-style: italic;
    font-weight: lighter;
    font-size: 10px;
}
#print a {
    color: #68d;
}
#print a:hover {
    color: #46a;
    background-color: rgba(255,255,255,0.5);
}

#v a {
    color: #8ae;
}

/** help dialog */

#help {
    position: fixed;
    -webkit-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
    text-align: left;
    top: 50px;
    left: 50%;
    color: black;
    border-radius: 10px;
    border: 10px solid #ddd;
    background-color: rgba(255,255,255,0.9);
    padding: 10px;
}
#help-close {
    position: absolute;
    z-index: 200;
    right: 3px;
    top: 3px;
}
#help a {
    color: #68d;
}
#help a:hover {
    color: #46a;
    background-color: rgba(255,255,255,0.5);
}
#help p {
    font-weight: normal;
}
button.selected {
    background-color: white;
}

/** tool dialog */

#tools {
    text-align: center;
}
#tools button {
    margin-left: 1px;
    margin-right: 2px;
}
#tools span {
    border: 0;
    background: transparent;
}
#tools-body {
    height: 100%;
}
#tool-labels label {
    display: block;
    text-align: center !important;
    font-weight: bold;
    font-size: 14px;
    padding-bottom: 5px;
    border: 0;
}
#tool-labels span {
    width: 200px;
    padding: 2px 5px 2px 5px;
    margin: 0 5px 5px 5px;
    background-color: #eee;
    border-radius: 5px;
    border: 1px solid #aaa;
    text-align: center;
}
#tool-cols > div {
    width: 200px;
    padding: 5px;
    margin: 5px;
    border: 1px solid #aaa;
    border-radius: 5px;
}
#tool-info > div {
    margin-top: 2px;
    margin-bottom: 2px;
    flex-basis: auto;
    flex-shrink: 0;
}
#tool-action {
    padding: 3px 3px 0 3px;
}
#tool-action > button {
    text-align: center;
}
#tool-action > span {
    flex-grow: 1;
    width: 100%;
}
#tools label {
    text-align: left;
}
#tools input {
    background-color: #ddd;
    margin-bottom: 1px;
    text-align: right;
}
#tools input:focus {
    background-color: #dee;
}
#tool-list > select {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    color: black;
    border: 0;
    margin-bottom: 2px;
    padding-bottom: 2px;
    background-color: transparent;
    overflow-y: auto;
    outline: none;
}
#tool-list select::-webkit-scrollbar {
    display: none;
}

/** device dialog */

#devices {
    text-align: center;
}
#devices button {
    margin-left: 1px;
    margin-right: 2px;
}
#devices span {
    border: 0;
    background: transparent;
}
#devices-body {
    height: 100%;
}
#device-labels span {
    width: 200px;
    padding: 2px 5px 2px 5px;
    margin: 0 5px 5px 5px;
    background-color: #eee;
    border-radius: 5px;
    border: 1px solid #aaa;
    text-align: center;
}
#device-cols > div {
    width: 200px;
    padding: 5px;
    margin: 5px;
    border: 1px solid #aaa;
    border-radius: 5px;
}
#device-info > div {
    margin-top: 2px;
    margin-bottom: 2px;
    flex-basis: auto;
    flex-shrink: 0;
    position: relative;
}
#device-action {
    padding: 3px 3px 0 3px;
}
#device-action > button {
    text-align: center;
}
#device-action > span {
    flex-grow: 1;
    width: 100%;
}
#device-labels label {
    display: block;
    text-align: center !important;
    font-weight: bold;
    font-size: 14px;
    padding-bottom: 5px;
    border: 0;
}
#devices label {
    text-align: left;
}
#devices input {
    background-color: #ddd;
    margin-bottom: 1px;
    text-align: right;
}
#devices input:focus {
    background-color: #dee;
}
#device-list select {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    color: black;
    border: 0;
    margin-bottom: 2px;
    padding-bottom: 2px;
    background-color: transparent;
    overflow-y: auto;
    outline: none;
}
#device-list select::-webkit-scrollbar {
    display: none;
}
#device-list option[local="1"] {
    color: #55d;
}
#device-list option[favorite="1"] {
    font-weight: bold;
}
#device label {
    white-space: nowrap;
}
#device textarea {
    overflow: hidden;
    font-family: monospace;
}

/** file catalog */

#import {
    width: 100%;
}
button[import="1"] {
    width: 5px;
    padding-left: 2px;
    padding-right: 2px;
}
#catalog {
    text-align: center;
    min-height: 25%;
    max-height: 75%;
    height: 1000px;
}
#catalog div {
    position: relative;
}
#catalogBody {
    height: 100%;
}
#catalogBody div::-webkit-scrollbar {
    display: none;
}
#catalogBody label {
    font-weight: bold;
    font-size: 14px;
    padding-bottom: 10px;
    border: 0;
}
#catalogList {
    overflow-y: scroll;
    overflow-x: hidden;
}
#catalogList button {
    margin: 0px 0px 2px 2px;
    overflow-x: hidden;
    text-overflow: ellipsis;
}

/** saved settings list */
#settings button {
    margin: 1px;
}
#settingsBody label {
    font-weight: bold;
    font-size: 14px;
    padding-bottom: 10px;
    border: 0;
}

/** layer slider and controls */

#layer-view {
    display: none;
    position: fixed;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    bottom: 0;
    left: 20%;
    right: 20%;
    margin: 0;
    padding: 4px;
    background-color: rgba(170,221,255,0.75);
    border: 1px solid #ccc;
    border-bottom: 0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
#layer-view button {
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,0.75);
}
#layer-view input {
    border-width: 1px;
    padding: 2px;
}
#layer-view > button,input {
    margin-left: 4px !important;
    margin-right: 4px !important;
}
#layer-slider {
    border: 0;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}
#layers {
    display: none;
    position: fixed;
    bottom: 25px;
    background-color: rgba(170,221,255,0.75);
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 3px;
    padding: 6px;
    -webkit-transform: translate(-9px, -5px);
    transform: translate(-9px, -5px);
}
#layers label {
    text-align: left;
    color: rgba(0,0,0,0.85);
}

.poptext {
    display: none;
    position: absolute;
    margin-left: 30px;
    border: 3px solid #ddd;
    border-radius: 3px;
    transform: translate(0, -25%);
    flex-direction: column;
    align-items: stretch;
    z-Index: 10000;
}
.poptext label {
    width: 100% !important;
    text-align: center !important;
    border-top: 1px solid #888;
    border-left: 1px solid #888;
    border-right: 1px solid #888;
    background-color: rgba(170,221,255,0.75);
    padding: 3px 0 3px 0;
    margin: 0;
    color: black;
}
.poptext textarea {
    flex-grow: 1;
    opacity: 0.95;
    outline: none;
    overflow-y: scroll !important;
}

#alert-area {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 40px;
    left: 0;
    right: 0;
}
#alert-border {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 25%;
    max-width: 50%;
    background-color: rgba(230,245,255,0.8);
    border: 3px solid rgba(200,215,255,0.6);
    border-radius: 5px;
}
#alert-border:hover {
    background-color: rgba(230,245,255,0.9);
    border: 3px solid rgba(200,215,255,0.95);
}
#alert-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-weight: bold;
    color: black;
    margin: 5px;
}
#alert-text p {
    margin: 5px;
}

.flex {
    display: flex;
}

.frow {
    flex-direction: row;
}

.fcol {
    flex-direction: column;
}

.fgro {
    flex-grow: 1;
}


#selected {
    position: fixed;
    z-index: 10000;
    color: #eee;
    bottom: 5px;
    left: 0px;
    padding: 5px;
    border-top: 3px solid #ddd;
    border-right: 3px solid #ddd;
    border-bottom: 3px solid #ddd;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    background-color: rgba(255,255,255,0.75);
    overflow: none;
    display: flex;
    flex-direction: row;
}
#selected > span {
    font-family: sans-serif;
    font-weight: normal;
    font-size: 12px;
    color: #555;

}
